/*
* Created by zhangkun on 2017/12/05
*/
define([
  './themes/lang/' + window.YUFP_SYS_CONFIG.language + '/pages/example/template/tablelist.js'
], function (require, exports) {
  // page加载完成后调用ready方法
  exports.ready = function (hashCode, data, cite) {
    yufp.lookup.reg('NATIONALITY,PUBLISH_STATUS,GENDER,EDUCATION_TYPE,IDENT_TYPE');

    var vm = yufp.custom.vue({
      el: '#template_tablelist',
      data: function () {
        return {
          expandCollapseName: ['base'],
          baseFields: [{
            columnCount: 2,
            fields: [
              { field: 'name', label: this.$t('tablelist.xm') },
              { field: 'gender', label: this.$t('tablelist.xb'), type: 'select', dataCode: 'GENDER' },
              { field: 'education', label: this.$t('tablelist.xl'), type: 'select', dataCode: 'EDUCATION_TYPE' },
              { field: 'cardType', label: this.$t('tablelist.zjlx'), type: 'select', dataCode: 'IDENT_TYPE' },
              { field: 'barthday', label: this.$t('tablelist.csrq'), type: 'date' },
              { field: 'cardNo', label: this.$t('tablelist.zjhm') },
              { field: 'company', label: this.$t('tablelist.gs') },
              { field: 'email', label: this.$t('tablelist.yx') }
            ]
          }],

          tableColumns: [
            { label: this.$t('tablelist.bm'), prop: 'id', width: 110 },
            { label: this.$t('tablelist.mc'), prop: 'title', width: 200, sortable: true, resizable: true },
            { label: this.$t('tablelist.lx'), prop: 'type', width: 110, dataCode: 'NATIONALITY' },
            { label: this.$t('tablelist.zz'), prop: 'author', width: 110 },
            { label: this.$t('tablelist.shr'), prop: 'auditor', width: 110 },
            { label: this.$t('tablelist.yds'), prop: 'pageviews', width: 100 },
            { label: this.$t('tablelist.zt'), prop: 'status', width: 120, dataCode: 'PUBLISH_STATUS' },
            { label: this.$t('tablelist.sj'), prop: 'create_at'}
          ]
        };
      }
    });
  };
});
